class Boy:
    __slots__ = ['name']

    # 限制动态赋值的属性
    # 不能与特姓名重复 , 会冲突

    def __init__(self,name,age):
        self.name = name


boy = Boy('陈欢')
# print(boy.name)
boy.name = '郑佳慧'
print(boy.name)
boy.age = 18
print(boy.age)
# boy.age = 18
# print(boy.age)
# b.ganer = '男'
# if     not  in __slots__ = ['name','age']
#  不可
# b._Boy__age = 10
#  改变私有属性
